package com.yzt.zhuju.network.service;

import com.alibaba.fastjson.JSONObject;
import com.yzt.zhuju.network.apiconfig.SystemUrlConfig;
import com.yzt.zhuju.network.entity.sysConfig.AliOSSCredentialBean;
import com.yzt.zhuju.network.entity.sysConfig.AppTextMapBean;
import com.yzt.zhuju.network.entity.sysConfig.CountryBean;
import com.yzt.zhuju.network.entity.sysConfig.SystemConfigBean;
import com.yzt.plugin_network.response.HttpResponse;

import java.util.List;

import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import rx.Observable;

/**
 * author : bob
 * date   : 2022/12/6
 * desc   :
 */
public interface SystemService {

    /**
     * 获取系统配置
     */
    @GET(SystemUrlConfig.API_SYSTEM_GET_SYS_CONFIG)
    Observable<HttpResponse<SystemConfigBean>> getSysConfig();

    /**
     * 获取系统配置新
     */
    @GET(SystemUrlConfig.API_SYSTEM_LOAD_APP_SYS_CONFIG)
    Observable<HttpResponse<JSONObject>> loadAppSysConfig();

    /**
     * 提示文案
     */
    @GET(SystemUrlConfig.API_GET_APP_TEXT_CONFIG)
    Observable<HttpResponse<AppTextMapBean>> getAppTextConfig();

    /**
     * 获取国家列表
     */
    @GET(SystemUrlConfig.API_GET_APP_NATIONAL_LIST)
    Observable<HttpResponse<List<CountryBean>>> getNationalList();

    /**
     * 获取语言列表
     */
    @GET(SystemUrlConfig.API_GET_APP_LANGUAGE_LIST)
    Observable<HttpResponse<List<CountryBean>>> getLanguageList();

    /**
     * 通知后台前后台状态
     */
    @GET(SystemUrlConfig.API_UPLOAD_USER_ONLINE_STATUS)
    Observable<HttpResponse> uploadUserOnlineStatus(@Query("onlineStatus") int onlineStatus);

    /**
     * 上报fps
     */
    @POST(SystemUrlConfig.API_REPORT_FPS)
    Observable<HttpResponse> reportFps(@Body RequestBody body);

    /**
     * 上报慢方法
     */
    @POST(SystemUrlConfig.API_REPORT_EVIL_METHOD)
    Observable<HttpResponse> reportEvilMethod(@Body RequestBody body);

    /**
     * 阿里签名
     */
    @POST(SystemUrlConfig.API_GET_ALI_OSS)
    Observable<HttpResponse<AliOSSCredentialBean>> getAliSign(@Body RequestBody body);

}
